﻿using QRCodeBluetooth.DAL;
using QRCodeBluetooth.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QRCodeBluetooth.BUS
{
    public class AppBUS
    {
        public ResponseMessage QueryAppAuditRecord(AppAuditRecord appAuditRecord)
        {
            ResponseMessage message = new ResponseMessage();
            AppDAL da = new AppDAL();
            message.errcode = 0;
            message.data = da.QueryAppAuditRecord(appAuditRecord);

            return message;
        }

        public ResponseMessage QueryAreaByOwner(string IdentityInf)
        {
            ResponseMessage message = new ResponseMessage();
            AppDAL da = new AppDAL();
            message.errcode = 0;
            message.data = da.QueryAreaByOwner(IdentityInf);

            return message;
        }

        public ResponseMessage QueryVoucher(AppVoucher appVoucher)
        {
            ResponseMessage message = new ResponseMessage();
            AppDAL da = new AppDAL();
            message.errcode = 0;
            message.data = da.QueryVoucher(appVoucher);

            return message;
        }

        public ResponseMessage QueryDevice(AppVoucher appVoucher)
        {
            ResponseMessage message = new ResponseMessage();
            AppDAL da = new AppDAL();
            message.errcode = 0;
            message.data = da.QueryDevice(appVoucher);

            return message;
        }
    }
}
